<!DOCTYPE html>
<html lang="en">
<head>
    <title>佳怡供应链金融</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">

    <meta name="description" content="Write an awesome description for your new site here. You can edit this line in _config.yml. It will appear in your document head meta (for Google search results) and in your feed.xml site description.
">
    <link rel="stylesheet" href="lib/weui.min.css">
    <link rel="stylesheet" href="css/jquery-weui.css">
    <link rel="stylesheet" href="demos/css/demos.css">
    <link rel="stylesheet" href="font/fontscss/iconfont.css">
    <link rel="stylesheet" href="css/common.css">
    <style type="text/css">
        .content-header {
            width: 100%;
            background-color: #FF9461;
            position: relative;
            z-index: 10;
            color: #fff;
        }

        #pro_name {
            font-size: 16px;
            padding-top: 0.7rem;
            text-align: center;
            /*padding-left: 15%;*/
        }

        #one_pri {
            font-size: 32px;
        }

        .ljsy {
            pont-size: 12px;
            opacity: 0.6;
        }

        .tzze {
            padding-top: 1.5rem;
            font-size: 16px;
        }

        .time {
            text-align: center;
        }

        .time-left {
            width: 50%;
            display: inline-block;
            line-height: 1.5rem;
        }

        .span1 {
            font-size: 14px;
        }

        .span2 {
            font-size: 12px;
            opacity: 0.6;
        }

        .time-left span {
            display: block;
        }

        .time-right {
            width: 48%;
            float: left;
            line-height: 1.5rem;
        }

        .time-right span {
            display: block;
        }

        .content-info ul li {
            height: 3rem;
            line-height: 3rem;
            border-bottom: 1px solid #E6E2E2;
            font-size: 16px;
        }

        .content-info ul li span {
            color: #FF9461
        }

        .content-info .content-orl {
            width: 10%;
            display: inline-block;
        }

        .content-info .content-title {
            width: 59%;
            display: inline-block;
        }

        .content-info .content-info {
            width: 25%;
            display: inline-block;
        }

        .content-info .content-orl {
            background-image: url("demos/images/rol.png");
        }
        .icon_back{
            position: absolute;
            left: -1rem;
            top: 0.9rem;
            width: 0.5rem;
            height: 1.0rem;
            background: url(./images/icon-back.png);
            background-size: 0.5rem 1em;
            vertical-align: middle;
        }
    </style>
    <script src="lib/jquery-2.1.4.js"></script>

</head>

<body>
<header>
    <div class="weui-row weui-no-gutter">
        <div class="weui-col-33" id="back_icon">
            <a href="javascript:history.go(-1)" class="icon pull-right"><i class="icon_back"></i></a>
        </div>
        <div class="weui-col-33">产品详细</div>
        <div class="weui-col-33" id="ligin_icon">
            <!-- <a href="login.html" class="icon pull-right"><i class="iconfont icon-wode"></i></a> -->
        </div>
    </div>
</header>
<div class="weui-cells">
    <input type="hidden" id="ids">

</div>

</body>
<script src="js/circleProgress.js"></script>
<script src="js/jquery-weui.js"></script>
<script src="js/reg.js"></script>
<script type="text/javascript">
    $(function () {

        var str = "";
        var id = localStorage.getItem("product_id");
        $("#ids").val(id);
        $.ajax({
            type: "POST",
            url: "productRelease/getsingTzRecord",
            data: {id: id},   //传递输入框中的值
            success: function (msg) {
                console.info(msg)

                str += "<div class=\"content-header\">"
                str += "    <div style=\"width:100%;height: 3.5rem;\">"
                str += "    <p id=\"pro_name\">产品名称:" + msg.product_id + "</p>"
                str += "    </div>"
                str += "    <div style=\"height: 7.25rem;text-align: center;\">"
                str += "   <p id=\"one_pri\">" + msg.withdraw_sy + "</p>"
                str += "    <p class=\"ljsy\">累计收益（元）</p>"
                str += "<p class=\"tzze\">提现金额 <span id=\"total_pri\">" + msg.withdraw_money + "</span> 元</p>"
                str += "</div>"
                str += " </div>"
                str += " <div style=\"background: #FFFFFF;\" class=\"content\">"
               /* str += "<div class=\"time\">"
                str += "  <div class=\"time-left\">"
                str += "   <span class=\"span1\">" + isNull(msg.withdraw_time) + "</span>"
                str += " <span class=\"span2\">投资结束时间</span>"
                str += "   </div>"
                str += "   <div class=\"time-right\">"
                str += "    <span class=\"span1\">" + isNull(msg.investment_start_time) + "</span>"
                str += " <span class=\"span2\">投资开始时间</span>"
                str += "    </div>"
                str += "    </div>"*/
                str += "    <div class=\"content-info\">"
                str += "    <ul>"
                str += "    <li>"
                str += "   <span class=\"content-orl\"></span>"
                str += "   <span class=\"content-title\">原收益率</span>"
                str += "   <span class=\"content-info\">" + msg.qrsyl + "</span>"
                str += "   </li>"
                str += "    <li>"
                str += "   <span class=\"content-orl\"></span>"
                str += "   <span class=\"content-title\">现收益率</span>"
                str += "   <span class=\"content-info\">" + msg.tjsyl + "</span>"
                str += "   </li>"
                str += "    <li>"
                str += "   <span class=\"content-orl\"></span>"
                str += "   <span class=\"content-title\">会员姓名</span>"
                str += "   <span class=\"content-info\">" + msg.username + "</span>"
                str += "   </li>"
                str += "    <li>"
                str += "   <span class=\"content-orl\"></span>"
                str += "   <span class=\"content-title\">驳回原因</span>"
                str += "   <span class=\"content-info\">" + msg.reasons + "</span>"
                str += "   </li>"
                str += "    <li>"
                str += "   <span class=\"content-orl\"></span>"
                str += "   <span class=\"content-title\">提现时间</span>"
                str += "   <span class=\"content-info\">" + msg.withdraw_time + "</span>"
                str += "   </li>"
                /*str += "    <li>"
                str += "  <span class=\"content-orl\"></span>"
                str += "    <span class=\"content-title\">投资是否确认</span>"
                //str += "    <span class=\"content-info\">" + (msg.instatus == 1 ? "已确认" : "未确认") + "</span>"
                str += "    <span class=\"content-info\">" + (msg.instatus == 0 ? "未确认" : "投资中") + "</span>"
                str += "    </li>"*/
                str += "   </ul>"
                str += "   </div>";
                str += "</div>"

                $(".weui-cells").append(str);
                if(msg.txstatue == 0&&msg.instatus!="0"){
                    var btn="";
                    // $(".jiafang").css("display","block");
                    btn+=  "<div class=\"weui-cell jiafang\" >"+
                        "<div class=\"weui-cell__hd\"><label class=\"weui-label\">提现时间</label></div>"+
                        "<div class=\"weui-cell__bd\">"+
                        "<input class=\"weui-input\" type=\"text\" name=\"withdraw_time1\" placeholder=\"请输入提现时间\" id=\"withdraw_time1\"/>"+
                        "</div>"+
                        "</div>"

                    btn+="<div class=\"weui-btn-area\">"
                    btn+=" <a class=\"weui-btn weui-btn_primary\" id=\"conf\" onclick=\"complte(1)\">提现申请</a>"
                    btn+=" </div>"
                    $(".weui-cells").append(btn);
                    $("#withdraw_time1") .calendar({

                    });
                }
            }
        });
    });


    function isNull(str) {
        if(str==null||str==""||str=="undefined"){
            return '';
        }else{
            return str;
        }
    }

    function  complte() {
        $.ajax({
            type: "POST",
            url:'productRelease/updateMyProductTxian',//idAndMoney将字符串传到后台进行解析
            data:{
                "withdraw_time":$("#withdraw_time1").val(),
                "id":$("#ids").val()
            },
            success:function(msg){
                //可提交
                $.toast("提交申请成功");
                window.location.href="myproduct.html";
            }
        });
    }
</script>
<script src="js/web/checkLogin.js"></script>

</html>